﻿CREATE TABLE [dbo].[tags] (
    [tag_id]       BIGINT        IDENTITY (1, 1) NOT NULL,
    [tag_name]     NVARCHAR (50) NOT NULL,
    [tag_group_id] BIGINT        NOT NULL,
    CONSTRAINT [PK_tags] PRIMARY KEY CLUSTERED ([tag_id] ASC),
    CONSTRAINT [FK_tags_tag_group] FOREIGN KEY ([tag_group_id]) REFERENCES [dbo].[tag_group] ([tag_group_id]),
    CONSTRAINT [ux_tags] UNIQUE NONCLUSTERED ([tag_name] ASC)
);





